<script setup>
import { ref } from "vue";
import SectionTitle from "../common/SectionTitle.vue";

const solutions = ref([
  {
    id: 1,
    title: "智慧农场管理系统",
    description:
      "结合物联网、大数据和人工智能技术，提供从种植到收获的全程智能化管理",
    image: "solution-image-1",
  },
  {
    id: 2,
    title: "精准农业解决方案",
    description: "基于卫星定位和传感器技术，实现农田精细化管理，提高资源利用率",
    image: "solution-image-2",
  },
]);

const solutionDescription =
  "针对不同农业场景，我们提供定制化的智能农业解决方案";
</script>

<template>
  <section class="section solutions-section" id="solutions">
    <div class="section-container">
      <SectionTitle title="解决方案" :description="solutionDescription" />
      <el-row :gutter="20" class="solutions-list">
        <el-col
          :xs="24"
          :sm="24"
          :md="12"
          v-for="solution in solutions"
          :key="solution.id"
        >
          <div class="solution-card">
            <div class="solution-content">
              <h3>{{ solution.title }}</h3>
              <p>{{ solution.description }}</p>
              <el-button type="primary">了解详情</el-button>
            </div>
            <div :class="['solution-image', solution.image]"></div>
          </div>
        </el-col>
      </el-row>
    </div>
  </section>
</template>

<style scoped>
.section {
  padding: var(--section-padding);
}

.solutions-section {
  background-color: var(--secondary-color);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.solution-card {
  display: flex;
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  height: 100%;
  transition: transform 0.3s ease;
}

.solution-card:hover {
  transform: translateY(-5px);
}

.solution-content {
  padding: 30px;
  flex: 1;
}

.solution-content h3 {
  margin-bottom: 15px;
  font-size: 20px;
}

.solution-content p {
  margin-bottom: 20px;
  color: var(--text-color-light);
  font-size: 14px;
  line-height: 1.6;
}

.solution-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  min-height: 250px;
}

.solution-image-1 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-7c8e0ed9a93c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

.solution-image-2 {
  background-image: url("https://images.unsplash.com/photo-1625243338629-28c3f5b7ea55?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
}

@media (max-width: 992px) {
  .solution-card {
    flex-direction: column;
  }

  .solution-image {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
}

@media (max-width: 576px) {
  .section {
    padding: 40px 0;
  }

  .solution-content {
    padding: 20px;
  }

  .solution-content h3 {
    font-size: 18px;
  }
}
</style> 